package com.htthorizon.neo4j.repository;

import com.htthorizon.neo4j.entity.RelationShip4;
import com.htthorizon.neo4j.entity.RelationShip5;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RelationShip5Repository extends Neo4jRepository<RelationShip5, Long> {
    @Query("MATCH (u:Upstream)-[r:R5]->(uf:UpstreamField) WHERE id(u) = $id RETURN uf ,r,u")
    List<RelationShip5> getById(@Param("id")Long id);
}
